package com.qianyu.project.core.utils;

import com.qianyu.project.core.context.handler.FlowFinishedHandler;

/**
 * @author gs
 * @date create in 2021/1/22 8:18
 */
public class FlowHandlerValidation {

    /**
     * description: 未实现FlowFinishHandler接口 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [type] <br/>
     * return: void
     */
    public static boolean isImplements(Class type) {
        Class[] interfaces = type.getInterfaces();
        boolean check = false;
        for (Class clazz : interfaces) {
            if (clazz == FlowFinishedHandler.class) {
                check = true;
                break;
            }
        }
        return check;
    }
}
